#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

int main()
{
    int n = 0, m = 0;
    cin >> n >> m;
    int tmp = 0;
    float sum = 0;
    for (int i = 0;i < n - m;i++)
    {
        cin >> tmp;
        sum += tmp;
    }
    printf("%.5f %.5f", (sum + m * 1) / n, (sum + m * 5) / n);
    return 0;
}
